using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class JobSeekers_search : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            string javaScript = "function ShowAdvanced(obj){obj.style.display='none';";
            javaScript += "document.getElementById(\"trCategory\").style.display='block';";
            javaScript += "document.getElementById(\"trIndustry\").style.display='block';return false;}";
            ClientScript.RegisterClientScriptBlock(this.GetType(),"AdvancedSearch",javaScript,true);
            if(!IsPostBack)
                LoadCriteria(); //LoadCriterias();
        }
        catch(Exception ex)
        {
            Literal1.Text = ex.Message;
        }
    }
    void LoadCriteria()
    {             
        ControlHelper controlHelper = new ControlHelper("");
        controlHelper.CommandText = "Select * from tblJobCategories";
        controlHelper.InitProperties();
        controlHelper.FillDataTableToDropDownList(
        this.jobCategory, "JobCategoryName", "JobCategoryID","");
        controlHelper.CommandText = "Select * from tblJobIndustries";
        controlHelper.InitProperties();
        controlHelper.FillDataTableToDropDownList(
        this.jobIndustry, "JobIndustryName", "JobIndustryID", "");
        
    }
    void LoadCriterias()
    {
        ControlHelper controlHelper = new ControlHelper("");
        controlHelper.CommandText = 
        "Select * from tblJobCategories " +
        "Select * from tblJobIndustries";
        controlHelper.InitProperties();
        controlHelper.FillDataTableToDropDownList(
        this.jobCategory, this.jobIndustry,
        "JobCategoryName", "JobIndustryName",
         "JobCategoryID", "JobIndustryID",  "", "");
        

    }
}
